package cn.stylefeng.guns.modular.api;

import cn.stylefeng.guns.modular.business.service.MaterialService;
import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 推广赚钱
 *
 * Created by pzp on 2019/7/31.
 */
@RestController
@RequestMapping("/gunsApi/material")
public class MaterialApi extends BaseController {


    @Autowired
    private MaterialService materialService;

    @ApiOperation("获取素材列表")
    @GetMapping("/get")
    public ResponseData get(@RequestParam String type,@RequestParam Integer current, @RequestParam Integer size) {
        return ResponseData.success(materialService.get(type,current,size));
    }
}
